package net.bezrabotnih.client.managed.ui;

import com.google.gwt.requestfactory.ui.client.ProxyRenderer;
import net.bezrabotnih.client.managed.request.UserRatingProxy;

public class UserRatingProxyRenderer extends ProxyRenderer<UserRatingProxy> {

    private static net.bezrabotnih.client.managed.ui.UserRatingProxyRenderer INSTANCE;

    protected UserRatingProxyRenderer() {
        super(new String[] { "note" });
    }

    public static net.bezrabotnih.client.managed.ui.UserRatingProxyRenderer instance() {
        if (INSTANCE == null) {
            INSTANCE = new UserRatingProxyRenderer();
        }
        return INSTANCE;
    }

    public String render(UserRatingProxy object) {
        if (object == null) {
            return "";
        }
        return object.getNote() + " (" + object.getId() + ")";
    }
}
